Basic Wiki Formatting
Introduction to Wiki Formatting Simple editing is one of the major benefits of using a wiki. Users can edit pages without knowing HTML, and still use many formatting features of HTML. Most wikis define a set of formatting rules to convert plain text into HTML. Some wikis (like this one) also allow some HTML "tags", like , , and within a page. (Some wikis use raw HTML instead of special formatting rules.) The following text is an overview of the MediaWiki text formatting rules. For examples without all the explanatory text, see the TextFormattingExamples. To try these rules for yourself, please feel free to edit the Sandbox page. To see how any page is formatted, just follow the link "Edit" at the top of the page. ---- Basic Text Formatting Most text does not require any special changes for wiki form. A few basic rules are: * Do not indent paragraphs. (Indenting may cause your text to appear in a monospaced font.) * Leave a single blank line between paragraphs. * To create a horizontal line, type 4 or more minus/dash/hyphen (-) characters. * There is no need to encode HTML characters like <, >, or &. * HTML-encoded characters like < will not be translated. * HTML characters like © and ∞ can be used on pages: do "& copy;" and "& infin;" with no space (version 0.91 and later). See http://www.w3.org/TR/html4/sgml/entities.html. ---- Bold, Italic and Fixed-width Text To mark text as bold, italic or fixed-width, you can use the HTML , and code tags. For example: bold , italic , bold+italic . Note that MediaWiki(like most Wikis) processes pages line-by-line, so if you want three bold lines of text, you will need to use three separate ... tags. Also note that unclosed or unmatched tags are not removed from the page. MediaWiki also implements the old "quote style" of text formatting, which is used on several wikis. Briefly: Two single quotes are italics, three single quotes are bold, five single quotes are bold and italic. looks like: Two single quotes are italics, three single quotes are bold, five single quotes are bold and italic. The "quote style" formatting is often confusing, especially when multiple bold and italic sections are mixed on a line. It may eventually be removed from UseModWiki. ---- Headings Headings are delimited by 1-6 equal signs (=). They basically correspond to HTML's through tags. = = Headline size 1 = = Headline size 2 Headline size 3 Headline size 4 Headline size 5 = = Headline size 6 = = N.b. There must be a space between the equal signs and the text. ---- Lists Simple lists: * Text for a bulleted list item. ** Text for second-level list. *** Text for third level, etc. ...which looks like: * Text for a bulleted list item. ** Text for second-level list. *** Text for third level, etc. Numbered lists: # Text for a numbered list item. ## Text for second-level list. ### Text for third level, etc. ## Another Text for the second level. ...which looks like: # Text for a numbered list item. ## Text for second-level list. ### Text for third level, etc. ## Another Text for the second level. ---- Indented Text Simple indented text: : Text to be indented (quote-block) :: Text indented more ::: Text indented to third level ...which looks like: : Text to be indented (quote-block) :: Text indented more ::: Text indented to third level Term with indented definition: a blank line between term and definition ;Term:Definition (indented) ;;Term (indented):Definition (indented two levels) ;;;Term (indented twice):Definition (indented to third level) ...which looks like: ;Term:Definition (indented) ;;Term (indented):Definition (indented two levels) ;;;Term (indented twice):Definition (indented to third level) ---- Preformatted Text Individual lines can be displayed as preformatted (fixed-width or "typewriter"-font) text by placing one or more spaces at the start of the line. Other wiki formatting (like links) will be applied to this kind of preformatted text. Additionally, multi-line sections can be marked as pre-formatted text using lines starting with (to start pre-formatted text), and (to end preformatted text). The and tags are not displayed. Wiki links and other formatting is not done within a preformatted section. (If you want wiki formatting, use spaces at the start of the line instead of the and tags.) For instance: Pre-formatted section here. No other link or format processing is done on pre-formatted sections. For instance, UseModWiki is not a link here. and: This is the starting-spaces version of preformatted text. Note that links like UseModWiki still work. ---- Embedding Tables Rather than going through the lengthy and complicated way to add a table, you can easily do it using wiki code. To start a table, add this text: And there you have it! For more detailed tables, please visit wikimedia.org ---- Miscellaneous Rules * To quote text without applying the wiki formatting rules, enclose it within a ... section. Within a nowiki section, only HTML-quoting of special characters (<>&) will occur--no other formatting rules will be applied. * A line which ends in a backslash character (\) will be joined with the next line before most formatting rules are applied. This can be useful for breaking up long sections of text in line-sensitive sections (like lists or indented text). * If raw-HTML sections are enabled (they are disabled by default), you can enter raw HTML code within a ... section. Note that no special character escaping is done, so you will need to use sequences like < if you want to display a < character. * Most of the formatting rules are order-independent. On rare occasions the order of processing may be important. The rules are processed in the following order: raw HTML sections, HTML quoting, nowiki tags, backslash line joining, preformatted sections, paragraphs, lists and indented text, horizontal lines, italic/bold text, URLs, and finally ordinary WikiName links. Category:Wiki Info